(function() {
	var page = pf.newPage('exp');
	var $el = null;

	/**
	 * 初始化时调用
	 */
	page.onCreate = function() {
		$el = page.$el;

		$el.find('.center_one_right1').on('click', function() {
			// var video_url={"cars":"lifestyle","car":"travel"};
			pf.goPage("exp");
			page.text_show("travel");
		});
		$el.find('.center_one_right2').on('click', function() {
			pf.goPage("exp");
			page.text_show("snowforce");
		});
		$el.find('.center_one_right3').on('click', function() {
			pf.goPage("exp");
			page.text_show("driving_school");
		});
		$el.find('.center_one_right4').on('click', function() {
			var video_url = {
				"cars": "lifestyle",
				"car": "golf",
				notJump: true
			};
			pf.goPage('model', video_url);
		});

		$el.on('click', '.mode_center_big', function() {
			pcc2.$video.fadeIn();
			if ($(this).attr("video") == "travel") {
				var videos_url = "./video/lifestyle/travel.mp4";
			} else if ($(this).attr("video") == "snowforce") {
				videos_url = "./video/exp/snowforce.mp4";
			} else if ($(this).attr("video") == "driving_school") {
				videos_url = "./video/exp/driving_school.mp4";
			} else if ($(this).attr("video") == "golf") {
				videos_url = "./video/lifestyle/golf.mp4";
			}
			pcc2.$video.append('<img style="position: absolute;bottom: 38px;right: 35px;z-index:100" src="./image/close.png"><video  class="vide_id" style="  width: 100%;height: 100%;" controls="controls" autoplay="autoplay"><source src=' + videos_url + ' type="video/mp4" /></video>');
		});
	};

	/**
	 * 页面显示时自动调用
	 */
	page.onShow = function(params) {
		// $el.show();

		if (params.subID)
			page.text_show(params.subID);
	};
	page.text_show = function(action) {
		$el.find('.porsche_model').html(__(action));
		$el.find('.center_three1').html(__(action + "_title2"));
		$el.find('.center_three2').html(__(action + "_desc"));
		$el.find('.mode_center_big').css("background", "url(./image/exp/" + action + ".jpg)");
		if (action == 'travel')
			$el.find('.mode_center_big').css("background", "url(./image/lifestyle/car_travel/travel-big-01.jpg)");
		$el.find('.mode_center_big').attr("video", action);
	};
	/**
	 * 页面隐藏时调用
	 */
	page.onHide = function() {
		// $el.hide();
		page.text_show("travel");
	};

})();